<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Aikes_系统</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<script type="text/javascript" src="css/js/jquery.min.js"></script>
<script type="text/javascript" src="css/js/dept.js"></script>
<script type="text/javascript" src="css/js/dept_add.js"></script>
<script type="text/javascript">
	$(function(){
		$("#navigation li a").eq(0).addClass("active");
		deptPage(1);
	});
	
	function deptAdd(){
		$("#dept_list").hide();
		$("#dept_add").fadeIn();
	}

</script>
</head>
<body>
<div id="header">
		<div class="shell">
			<div id="top">
				<c:import url="../logo.jsp"></c:import>
			</div>
			<div id="navigation" style="padding-bottom:150px;">
				<c:import url="../menu.jsp"></c:import>
			</div>
		</div>
</div>
	<!-- Container -->
	<div id="container" >
		<!-- Content -->
		<div id="main" style="margin-left:360px;">
		  <div class="cl">&nbsp;</div>	
			<div id="content">	
			   <div id="dept_list" class="box" style="width: 650px; display:block;" >
				  <div class="box-head">
						<h2 class="left">部门管理</h2>
				  </div>
					<div class="table" id="dept_table">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<thead >
							<tr class="index_tr">
								<th width="20%;">部门名称</th>
								<th width="20%;">员工数量</th>
								<th width="50%;">部门职责</th>
								<th width="10%;">操作</th>
							</tr>
						</thead>
						<tbody id="dept_tbody">
							
						</tbody>
					</table>
					<p id="dept_error" style="font-size:16px; font-weight:bold;display:none;
					padding-top:11px;margin:0 280px; width:100%;">权限不够!</p>
					<!-- Pagging -->
					<div class="pagging">
						<div id = "dept_page" class="left" style = "padding:0 75px;">
			                 
						</div>
						<c:if test="${admin.roll=='0' }">
						<div id="createDept" class = "right" style="padding-right: 30px;">
							<a href="javascript:deptAdd();" style="color:#666;">创建部门</a>
						</div>
						</c:if>
					</div>
				</div>
					<!-- End Pagging -->
			</div>
	<div class="cl">&nbsp;</div>			
<!-- End Content -->
<!-- save -->
			<div class="box" id="dept_add" style="width:450px;margin-left:100px;display:none;">
				<div class="box-head">
					<span class="icon"> <i class="icon-align-justify"></i>
					</span>
					<h2>添加部门</h2>
				</div>
				<form  class="form" style="padding:15px 10px 5px 55px;width:400px;">
					<p>
						<span class="inline-field">部&nbsp;&nbsp;门&nbsp;&nbsp;名&nbsp;&nbsp;称 :&nbsp;&nbsp;</span>
						<input	type="text" id="deptName" class="field size2" />
					</p>
					<p>
						<span class="inline-field">部&nbsp;&nbsp;门&nbsp;&nbsp;职&nbsp;&nbsp;责 :&nbsp;&nbsp;</span> 
						<input	type="text" id="deptTask" class="field size2" />
					</p>
					<div class="buttons" style="width:310px;">
						<span id="dept_add_error" class="left"></span>
						<input type="button" class="button" value="返回" onclick="deptBack()"/>
						<input type="button" id="save" class="button" value="保存" onclick="deptSave()"/>
					</div>
				</form>
			</div>
		<!-- save -->
		</div>
</div>
	
</div>
<!-- Footer -->
<div id="footer">
	<div class="shell">
		<span class="left">&copy; 2017 - Aikesls</span>
	</div>
</div>
<!-- End Footer -->

</body>
</html>